package com.itheima.gui;

import javax.swing.*;
import javax.swing.border.Border;
import java.awt.*;

public class Test3 {

    public static void main(String[] args) {

        //BorderLayout 边界布局
        JFrame jf = new JFrame("BorderLayout Example");
        jf.setSize(400,300);
        jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        jf.setLayout(new BorderLayout());

        jf.add(new JButton("North"),BorderLayout.NORTH);
        jf.add(new JButton("South"),BorderLayout.SOUTH);
        jf.add(new JButton("East"),BorderLayout.EAST);
        jf.add(new JButton("West"),BorderLayout.WEST);
        jf.add(new JButton("Center"),BorderLayout.CENTER);

        jf.setVisible(true);

    }
}
